<template>
  <div>
    <Upload
        :type="originParams.type"
        name="file"
        :data="uploadData"
        :action="uploadAction"
        >
        <div style="padding: 30px 50px">
            <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
            <p>Click or drag files here to upload</p>
        </div>
    </Upload>
  </div>
</template>

<script>
import { SERVERTAPI } from '@/config/index'
import md5 from "md5";
const dayjs = require("dayjs");
const path = "api/Common/uploadPic";
export default {
  name:'WUpload',
  data(){
    return {
      uploadAction:`${SERVERTAPI}${path}`,
      uploadData:{}
    }
  },
  mounted(){

  },
  props:{
    // iview upload支持的props
    originParams:{
      type:Object,
      default:()=>{}
    },
    // 上传请求body传参
    uploadParams:{
      type:Object,
      default:()=>{},
      require:true
    }
  }
}
</script>

<style>

</style>
